#!/usr/bin/perl -w

while (<>) {
  s/ +/ /g;
  s/ $//;
  print;
}
